#include <stdio.h>

void max_min(int arr[],int n,int *max,int *min);


int main(){
	int a[10]={},large,small,i;
	printf("请输入一组数字：\n");
	for(i = 0;i < 10;i++){
		scanf("%d",&a[i]);
	}
	max_min(a,10,&large,&small);
	printf("max = %d \n",large);
	printf("min = %d \n",small);
	return 0;
}

void max_min(int arr[],int n,int *max,int *min){
	int i;
	*max = *min = arr[0];
	for(i = 1;i < n; i++){
		if(arr[i] > *max) *max = arr[i];
		if(arr[i] < *min) *min = arr[i];
	}
}
